package cn.scut.srp.mapper;

import cn.scut.srp.model.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface StudentMapper {

    @Select("""
            select student_account,password,student_name
            from machine_room.student where student_name = #{name} AND is_deleted = false
            """)
    @ResultType(Student.class)
    Student getStudentByName(String name);
    @Select("""
            select student_account,password,student_name
            from machine_room.student where student_account = #{student_account} AND is_deleted = false
            """)
    @ResultType(Student.class)
    Student getStudentByAccount(String student_account);
}
